<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   如何用70行Java代码实现深度神经网络算法  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/21937.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466459782: Accept with keywords: (title(0.5):社区,深度神经网络,代码,数盟,行,算法, topn(0.466666666667):初始化,步长,数盟,深度学习,程序员,神经网络,数组,过程,截距,效果,结果,人工智能,参数,动量,计算,文章,层数,数据,节点,系数,函数,权重,记录,样本,算法,误差,分类,程序,每层,计算误差).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    如何用70行Java代码实现深度神经网络算法
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    如何用70行Java代码实现深度神经网络算法 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,69] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/ai">
       人工智能
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/21937.html">
          如何用70行Java代码实现深度神经网络算法
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          1,093 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/ai" rel="category tag">
          人工智能
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <div class="description markdown_views">
        <p>
         对于现在流行的深度学习，保持学习精神是必要的——程序员尤其是架构师永远都要对核心技术和关键算法保持关注和敏感，必要时要动手写一写掌握下来，先不用关心什么时候用到——用不用是政治问题，会不会写是技术问题，就像军人不关心打不打的问题，而要关心如何打赢的问题。
        </p>
        <h2>
         程序员如何学习机器学习
        </h2>
        <p>
         对 程序员来说，机器学习是有一定门槛的（这个门槛也是其核心竞争力），相信很多人在学习机器学习时都会为满是数学公式的英文论文而头疼，甚至可能知难而退。 但实际上机器学习算法落地程序并不难写，下面是70行代码实现的反向多层（BP）神经网络算法，也就是深度学习。其实不光是神经网络，逻辑回归、决策树 C45/ID3、随机森林、贝叶斯、协同过滤、图计算、Kmeans、PageRank等大部分机器学习算法都能在100行单机程序内实现（以后考虑分享 出来）。
        </p>
        <p>
         机器学习的真正难度在于它为什么要这么计算，它背后的数学原理是什么，怎么推导得来的公式，网上大部分的资料都在介绍这部分理论知 识，却很少告诉你该算法的计算过程和程序落地是怎么样的，对于程序员来说，你需要做的仅是工程化应用，而不需要证明出一项新的数学计算方法。实际大部分机 器学习工程师都是利用别人写好的开源包或者工具软件，输入数据和调整计算系数来训练结果，甚至很少自己实现算法过程。但是掌握每个算法的计算过程仍然非常 重要，这样你才能理解该算法让数据产生了什么样的变化，理解算法的目的是为了达到什么样的效果。
        </p>
        <p>
         本文重点探讨反向神经网络的单机实现，关于神经网络的多机并行化，
         <a href="http://www.oschina.net/p/fourinone" target="_blank">
          Fourinone
         </a>
         提供非常灵活完善的并行计算框架，我们只需要理解透单机程序实现，就能构思和设计出分布式并行化方案，如果不理解算法计算过程，一切思路将无法展开。另外，还有卷积神经网络，主要是一种降维思想，用于图像处理，不在本文讨论范围。
        </p>
        <hr/>
        <p>
         延伸阅读：
        </p>
        <ul>
         <li>
          <a href="http://www.csdn.net/article/2015-08-27/2825551" target="_blank">
           机器学习开发者的现代化路径：不需要从统计学微积分开始
          </a>
         </li>
         <li>
          <a href="http://www.csdn.net/article/2015-07-13/2825187" target="_blank">
           开发者成功使用机器学习的十大诀窍
          </a>
         </li>
         <li>
          <a href="http://www.csdn.net/article/2015-09-08/2825647" target="_blank">
           机器学习温和指南
          </a>
         </li>
        </ul>
        <hr/>
        <h2>
         神经网络的计算过程
        </h2>
        <p>
         神经网络结构如下图所示，最左边的是输入层，最右边的是输出层，中间是多个隐含层，隐含层 和输出层的每个神经节点，都是由上一层节点乘以其权重累加得到，标上“+1”的圆圈为截距项b，对输入层外每个节 点：Y=w0*x0+w1*x1+…+wn*xn+b，由此我们可以知道神经网络相当于一个多层逻辑回归的结构。
        </p>
        <p>
         <img src="http://img.blog.csdn.net/20160217224445477"/>
        </p>
        <p>
        </p>
        <center>
         （图片来自
         <a href="http://ufldl.stanford.edu/wiki/index.php/UFLDL_Tutorial" target="_blank">
          UFLDL Tutorial
         </a>
         ）
        </center>
        算 法计算过程：输入层开始，从左往右计算，逐层往前直到输出层产生结果。如果结果值和目标值有差距，再从右往左算，逐层向后计算每个节点的误差，并且调整每 个节点的所有权重，反向到达输入层后，又重新向前计算，重复迭代以上步骤，直到所有权重参数收敛到一个合理值。由于计算机程序求解方程参数和数学求法不一 样，一般是先随机选取参数，然后不断调整参数减少误差直到逼近正确值，所以大部分的机器学习都是在不断迭代训练，下面我们从程序上详细看看该过程实现就清 楚了。
        <p>
        </p>
        <h2>
         神经网络的算法程序实现
        </h2>
        <p>
         神经网络的算法程序实现分为初始化、向前计算结果，反向修改权重三个过程。
        </p>
        <h3>
         1. 初始化过程
        </h3>
        <p>
         由 于是n层神经网络，我们用二维数组layer记录节点值，第一维为层数，第二维为该层节点位置，数组的值为节点值；同样，节点误差值layerErr也是 相似方式记录。用三维数组layer_weight记录各节点权重，第一维为层数，第二维为该层节点位置，第三维为下层节点位置，数组的值为某节点到达下 层某节点的权重值，初始值为0-1之间的随机数。为了优化收敛速度，这里采用动量法权值调整，需要记录上一次权值调整量，用三维数组 layer_weight_delta来记录，截距项处理：程序里将截距的值设置为1，这样只需要计算它的权重就可以了，
        </p>
        <h3>
         2. 向前计算结果
        </h3>
        <p>
         采用S函数1/(1+Math.exp(-z))将每个节点的值统一到0-1之间，再逐层向前计算直到输出层，对于输出层，实际上是不需要再用S函数的，我们这里将输出结果视为0到1之间的概率值，所以也采用了S函数，这样也有利于程序实现的统一性。
        </p>
        <h3>
         3. 反向修改权重
        </h3>
        <p>
         神经网络如何计算误差，一般采用平方型误差函数E，如下：
        </p>
        <p>
         <img src="http://img.blog.csdn.net/20160217225112749"/>
        </p>
        <p>
         也 就是将多个输出项和对应目标值的误差的平方累加起来，再除以2。实际上逻辑回归的误差函数也是这个，至于为什么要用这个函数来计算误差，它从数学上的合理 性是什么，怎么得来的，这个我建议程序员们不想当数学家的话，先不去深究了，现在我们要做的是如何把这个函数E误差取它的最小值，需要对其进行求导，如果 有些求导数学基础的话，倒可以尝试去推导下如何从函数E对权重求导得到下面这个公式的：
        </p>
        <p>
         <img src="http://img.blog.csdn.net/20160217225135062"/>
        </p>
        <p>
         不会推导也没有关系，我们只需要运用结果公式就可以了，在我们的程序里用layerErr记录了E对权重求导后的最小化误差，再根据最小化误差去调整权重。
        </p>
        <p>
         注意这里采用动量法调整，将上一次调整的经验考虑进来，避免陷入局部最小值，下面的k代表迭代次数，mobp为动量项，rate为学习步长：
        </p>
        <p>
        </p>
        <center>
         Δw(k+1) = mobp*Δw(k)+rate*Err*Layer
        </center>
        也有很多使用下面的公式，效果上的差别不是太大：
        <p>
        </p>
        <p>
        </p>
        <center>
         Δw(k+1) = mobp*Δw(k)+(1-mobp)rate*Err*Layer
        </center>
        为 了提升性能，注意程序实现是在一个while里面同时计算误差和调整权重，先将位置定位到倒数第二层（也就是最后一层隐含层）上，然后逐层反向调整，根据 L+1层算好的误差来调整L层的权重，同时计算好L层的误差，用于下一次循环到L-1层时计算权重，以此循环下去直到倒数第一层（输入层）结束。
        <p>
        </p>
        <h3>
         小结
        </h3>
        <p>
         在整个计算过程中，节点的值是每次计算都在变化的，不需要保存，而权重参数和误差参数是需要保存的，需要为下一次迭代提供支持，因此，如果我们构思一个分布式的多机并行计算方案，就能理解其他框架中为什么会有一个Parameter Server的概念。
        </p>
        <h2>
         多层神经网络完整程序实现
        </h2>
        <p>
         下面的实现程序BpDeep.java可以直接拿去使用，也很容易修改为C、C#、Python等其他任何语言实现，因为都是使用的基本语句，没有用到其他Java库（除了Random函数）。
         <strong>
          以下为原创程序，转载引用时请注明作者和出处。
         </strong>
        </p>
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866801c391791293190" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           import java.util.Random;
&lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;class&lt;/span&gt; BpDeep{
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][] layer;&lt;span class="hljs-comment"&gt;//神经网络各层节点&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][] layerErr;&lt;span class="hljs-comment"&gt;//神经网络各节点误差&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][][] layer_weight;&lt;span class="hljs-comment"&gt;//各层节点权重&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][][] layer_weight_delta;&lt;span class="hljs-comment"&gt;//各层节点权重动量&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; mobp;&lt;span class="hljs-comment"&gt;//动量系数&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; rate;&lt;span class="hljs-comment"&gt;//学习系数&lt;/span&gt;

    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-title"&gt;BpDeep&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt;[] layernum, &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; rate, &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; mobp){
        &lt;span class="hljs-keyword"&gt;this&lt;/span&gt;.mobp = mobp;
        &lt;span class="hljs-keyword"&gt;this&lt;/span&gt;.rate = rate;
        layer = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum.length][];
        layerErr = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum.length][];
        layer_weight = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum.length][][];
        layer_weight_delta = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum.length][][];
        Random random = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; Random();
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; l=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;l&amp;lt;layernum.length;l++){
            layer[l]=&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum[l]];
            layerErr[l]=&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum[l]];
            &lt;span class="hljs-keyword"&gt;if&lt;/span&gt;(l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;&amp;lt;layernum.length){
                layer_weight[l]=&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum[l]+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][layernum[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;]];
                layer_weight_delta[l]=&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[layernum[l]+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][layernum[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;]];
                &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;j&amp;lt;layernum[l]+&lt;span class="hljs-number"&gt;1&lt;/span&gt;;j++)
                    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;i&amp;lt;layernum[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;];i++)
                        layer_weight[l][j][i]=random.nextDouble();&lt;span class="hljs-comment"&gt;//随机初始化权重&lt;/span&gt;
            }   
        }
    }
    &lt;span class="hljs-comment"&gt;//逐层向前计算输出&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] &lt;span class="hljs-title"&gt;computeOut&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] &lt;span class="hljs-keyword"&gt;in&lt;/span&gt;){
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; l=&lt;span class="hljs-number"&gt;1&lt;/span&gt;;l&amp;lt;layer.length;l++){
            &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;j&amp;lt;layer[l].length;j++){
                &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; z=layer_weight[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;][layer[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;].length][j];
                &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;i&amp;lt;layer[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;].length;i++){
                    layer[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]=l==&lt;span class="hljs-number"&gt;1&lt;/span&gt;?&lt;span class="hljs-keyword"&gt;in&lt;/span&gt;[i]:layer[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i];
                    z+=layer_weight[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i][j]*layer[l-&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i];
                }
                layer[l][j]=&lt;span class="hljs-number"&gt;1&lt;/span&gt;/(&lt;span class="hljs-number"&gt;1&lt;/span&gt;+Math.exp(-z));
            }
        }
        &lt;span class="hljs-keyword"&gt;return&lt;/span&gt; layer[layer.length-&lt;span class="hljs-number"&gt;1&lt;/span&gt;];
    }
    &lt;span class="hljs-comment"&gt;//逐层反向计算误差并修改权重&lt;/span&gt;
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;updateWeight&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] tar){
        &lt;span class="hljs-keyword"&gt;int&lt;/span&gt; l=layer.length-&lt;span class="hljs-number"&gt;1&lt;/span&gt;;
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;j&amp;lt;layerErr[l].length;j++)
            layerErr[l][j]=layer[l][j]*(&lt;span class="hljs-number"&gt;1&lt;/span&gt;-layer[l][j])*(tar[j]-layer[l][j]);

        &lt;span class="hljs-keyword"&gt;while&lt;/span&gt;(l--&amp;gt;&lt;span class="hljs-number"&gt;0&lt;/span&gt;){
            &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;j&amp;lt;layerErr[l].length;j++){
                &lt;span class="hljs-keyword"&gt;double&lt;/span&gt; z = &lt;span class="hljs-number"&gt;0.0&lt;/span&gt;;
                &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;i&amp;lt;layerErr[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;].length;i++){
                    z=z+l&amp;gt;&lt;span class="hljs-number"&gt;0&lt;/span&gt;?layerErr[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]*layer_weight[l][j][i]:&lt;span class="hljs-number"&gt;0&lt;/span&gt;;
                    layer_weight_delta[l][j][i]= mobp*layer_weight_delta[l][j][i]+rate*layerErr[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]*layer[l][j];&lt;span class="hljs-comment"&gt;//隐含层动量调整&lt;/span&gt;
                    layer_weight[l][j][i]+=layer_weight_delta[l][j][i];&lt;span class="hljs-comment"&gt;//隐含层权重调整&lt;/span&gt;
                    &lt;span class="hljs-keyword"&gt;if&lt;/span&gt;(j==layerErr[l].length-&lt;span class="hljs-number"&gt;1&lt;/span&gt;){
                        layer_weight_delta[l][j+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]= mobp*layer_weight_delta[l][j+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]+rate*layerErr[l+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i];&lt;span class="hljs-comment"&gt;//截距动量调整&lt;/span&gt;
                        layer_weight[l][j+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i]+=layer_weight_delta[l][j+&lt;span class="hljs-number"&gt;1&lt;/span&gt;][i];&lt;span class="hljs-comment"&gt;//截距权重调整&lt;/span&gt;
                    }
                }
                layerErr[l][j]=z*layer[l][j]*(&lt;span class="hljs-number"&gt;1&lt;/span&gt;-layer[l][j]);&lt;span class="hljs-comment"&gt;//记录误差&lt;/span&gt;
            }
        }
    }

    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;train&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] &lt;span class="hljs-keyword"&gt;in&lt;/span&gt;, &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] tar){
        &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] &lt;span class="hljs-keyword"&gt;out&lt;/span&gt; = computeOut(&lt;span class="hljs-keyword"&gt;in&lt;/span&gt;);
        updateWeight(tar);
    }
}
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-576866801c391791293190-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-41">
                41
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-42">
                42
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-43">
                43
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-44">
                44
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-45">
                45
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-46">
                46
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-47">
                47
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-48">
                48
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-49">
                49
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-50">
                50
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-51">
                51
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-52">
                52
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-53">
                53
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-54">
                54
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-55">
                55
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-56">
                56
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-57">
                57
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-58">
                58
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-59">
                59
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-60">
                60
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-61">
                61
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-62">
                62
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-63">
                63
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-64">
                64
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-65">
                65
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-66">
                66
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-67">
                67
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-68">
                68
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-69">
                69
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c391791293190-70">
                70
               </div>
               <div class="crayon-num" data-line="crayon-576866801c391791293190-71">
                71
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-576866801c391791293190-1">
                <span class="crayon-e">
                 import
                </span>
                <span class="crayon-v">
                 java
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 util
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 Random
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-2">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 BpDeep
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //神经网络各层节点&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //神经网络各节点误差&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //各层节点权重&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //各层节点权重动量&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 mobp
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //动量系数&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-8">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 rate
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //学习系数&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-9">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-title"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 BpDeep
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 rate
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 mobp
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-11">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 this
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 mobp
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 mobp
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 this
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 rate
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 rate
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-13">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Random
                </span>
                <span class="crayon-v">
                 random
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Random
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-18">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-24">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-25">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layernum
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-26">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 random
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 nextDouble
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //随机初始化权重&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-27">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-h">
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-28">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-29">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-30">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //逐层向前计算输出&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-31">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-title"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 computeOut
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-32">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-33">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-34">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-35">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-36">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 ==
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ?
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-37">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-38">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-39">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-v">
                 Math
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 exp
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-40">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-41">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-42">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 return
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-43">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-44">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //逐层反向计算误差并修改权重&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-45">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 void
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-title"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 updateWeight
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 tar
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-46">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-47">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-48">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 tar
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-49">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-50">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 while
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 --
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-51">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-52">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-53">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-54">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-v">
                 z
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ?
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-55">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e ">
                 mobp*
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-e ">
                 rate*
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //隐含层动量调整&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-56">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //隐含层权重调整&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-57">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 if
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ==
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-58">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e ">
                 mobp*
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-e ">
                 rate*
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //截距动量调整&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-59">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layer_weight
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 +=
                </span>
                <span class="crayon-v">
                 layer_weight_delta
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //截距权重调整&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-60">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-61">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-62">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 layerErr
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-e ">
                 z*
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 *
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-v">
                 layer
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 l
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //记录误差&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-63">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-64">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-65">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-66">
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-67">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 void
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-title"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 train
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 tar
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-68">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 out
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 computeOut
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-69">
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 updateWeight
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 tar
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c391791293190-70">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c391791293190-71">
                <span class="crayon-sy">
                 }
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.3102 seconds] -->
        <p>
        </p>
        <h2>
         一个运用神经网络的例子
        </h2>
        <p>
         最后我们找个简单例子来看看神经网络神奇的效果。为了方便观察数据分布，我 们选用一个二维坐标的数据，下面共有4个数据，方块代表数据的类型为1，三角代表数据的类型为0，可以看到属于方块类型的数据有（1，2）和（2，1）， 属于三角类型的数据有（1，1），（2，2），现在问题是需要在平面上将4个数据分成1和0两类，并以此来预测新的数据的类型。
        </p>
        <p>
         <img src="http://img.blog.csdn.net/20160217225653725"/>
        </p>
        <p>
         我 们可以运用逻辑回归算法来解决上面的分类问题，但是逻辑回归得到一个线性的直线做为分界线，可以看到上面的红线无论怎么摆放，总是有一个样本被错误地划分 到不同类型中，所以对于上面的数据，仅仅一条直线不能很正确地划分他们的分类，如果我们运用神经网络算法，可以得到下图的分类效果，相当于多条直线求并集 来划分空间，这样准确性更高。
        </p>
        <p>
         <img src="http://img.blog.csdn.net/20160217225717482"/>
        </p>
        <p>
         下面是这个测试程序BpDeepTest.java的源码：
        </p>
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576866801c3b3267759240" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           import java.util.Arrays;
&lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;class&lt;/span&gt; BpDeepTest{
    &lt;span class="hljs-keyword"&gt;public&lt;/span&gt; &lt;span class="hljs-keyword"&gt;static&lt;/span&gt; &lt;span class="hljs-keyword"&gt;void&lt;/span&gt; &lt;span class="hljs-title"&gt;main&lt;/span&gt;(String[] args){
        &lt;span class="hljs-comment"&gt;//初始化神经网络的基本配置&lt;/span&gt;
        &lt;span class="hljs-comment"&gt;//第一个参数是一个整型数组，表示神经网络的层数和每层节点数，比如{3,10,10,10,10,2}表示输入层是3个节点，输出层是2个节点，中间有4层隐含层，每层10个节点&lt;/span&gt;
        &lt;span class="hljs-comment"&gt;//第二个参数是学习步长，第三个参数是动量系数&lt;/span&gt;
        BpDeep bp = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; BpDeep(&lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;int&lt;/span&gt;[]{&lt;span class="hljs-number"&gt;2&lt;/span&gt;,&lt;span class="hljs-number"&gt;10&lt;/span&gt;,&lt;span class="hljs-number"&gt;2&lt;/span&gt;}, &lt;span class="hljs-number"&gt;0.15&lt;/span&gt;, &lt;span class="hljs-number"&gt;0.8&lt;/span&gt;);

        &lt;span class="hljs-comment"&gt;//设置样本数据，对应上面的4个二维坐标数据&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][] data = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][]{{&lt;span class="hljs-number"&gt;1&lt;/span&gt;,&lt;span class="hljs-number"&gt;2&lt;/span&gt;},{&lt;span class="hljs-number"&gt;2&lt;/span&gt;,&lt;span class="hljs-number"&gt;2&lt;/span&gt;},{&lt;span class="hljs-number"&gt;1&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;},{&lt;span class="hljs-number"&gt;2&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;}};
        &lt;span class="hljs-comment"&gt;//设置目标数据，对应4个坐标数据的分类&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][] target = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[][]{{&lt;span class="hljs-number"&gt;1&lt;/span&gt;,&lt;span class="hljs-number"&gt;0&lt;/span&gt;},{&lt;span class="hljs-number"&gt;0&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;},{&lt;span class="hljs-number"&gt;0&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;},{&lt;span class="hljs-number"&gt;1&lt;/span&gt;,&lt;span class="hljs-number"&gt;0&lt;/span&gt;}};

        &lt;span class="hljs-comment"&gt;//迭代训练5000次&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; n=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;n&amp;lt;&lt;span class="hljs-number"&gt;5000&lt;/span&gt;;n++)
            &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; i=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;i&amp;lt;data.length;i++)
                bp.train(data[i], target[i]);

        &lt;span class="hljs-comment"&gt;//根据训练结果来检验样本数据&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;for&lt;/span&gt;(&lt;span class="hljs-keyword"&gt;int&lt;/span&gt; j=&lt;span class="hljs-number"&gt;0&lt;/span&gt;;j&amp;lt;data.length;j++){
            &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] result = bp.computeOut(data[j]);
            System.&lt;span class="hljs-keyword"&gt;out&lt;/span&gt;.println(Arrays.toString(data[j])+&lt;span class="hljs-string"&gt;":"&lt;/span&gt;+Arrays.toString(result));
        }

        &lt;span class="hljs-comment"&gt;//根据训练结果来预测一条新数据的分类&lt;/span&gt;
        &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] x = &lt;span class="hljs-keyword"&gt;new&lt;/span&gt; &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[]{&lt;span class="hljs-number"&gt;3&lt;/span&gt;,&lt;span class="hljs-number"&gt;1&lt;/span&gt;};
        &lt;span class="hljs-keyword"&gt;double&lt;/span&gt;[] result = bp.computeOut(x);
        System.&lt;span class="hljs-keyword"&gt;out&lt;/span&gt;.println(Arrays.toString(x)+&lt;span class="hljs-string"&gt;":"&lt;/span&gt;+Arrays.toString(result));
    }
}
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-576866801c3b3267759240-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-576866801c3b3267759240-30">
                30
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-576866801c3b3267759240-1">
                <span class="crayon-e">
                 import
                </span>
                <span class="crayon-v">
                 java
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 util
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 Arrays
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-2">
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 BpDeepTest
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-3">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 public
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-m">
                 static
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 void
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-title"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 main
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-t">
                 String
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 args
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-4">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //初始化神经网络的基本配置&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-5">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //第一个参数是一个整型数组，表示神经网络的层数和每层节点数，比如{3,10,10,10,10,2}表示输入层是3个节点，输出层是2个节点，中间有4层隐含层，每层10个节点&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-6">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //第二个参数是学习步长，第三个参数是动量系数&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-7">
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 BpDeep
                </span>
                <span class="crayon-v">
                 bp
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 BpDeep
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 10
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0.15
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0.8
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-8">
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-9">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //设置样本数据，对应上面的4个二维坐标数据&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-10">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 2
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-11">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //设置目标数据，对应4个坐标数据的分类&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-12">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 target
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-13">
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-14">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //迭代训练5000次&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-15">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 n
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 n
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 5000
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 n
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-16">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-17">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bp
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 train
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 target
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 i
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-18">
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-19">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //根据训练结果来检验样本数据&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-20">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-st">
                 for
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 int
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 lt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-v">
                 length
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-o">
                 ++
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 {
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-21">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 result
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bp
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 computeOut
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-22">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 System
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 out
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 println
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 Arrays
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 toString
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 data
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 j
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-string"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ":"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-v">
                 Arrays
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 toString
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 result
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-23">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-24">
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-25">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-comment"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-c">
                 //根据训练结果来预测一条新数据的分类&lt;/span&gt;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-26">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 x
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-r">
                 new
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-sy">
                 {
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 3
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-number"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-cn">
                 1
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 }
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-27">
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-t">
                 double
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 result
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bp
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 computeOut
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 x
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-28">
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 System
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-keyword"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-v">
                 out
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 println
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 Arrays
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 toString
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 x
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-e">
                 span
                </span>
                <span class="crayon-t">
                 class
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-s">
                 "hljs-string"
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-s">
                 ":"
                </span>
                <span class="crayon-o">
                 &lt;
                </span>
                <span class="crayon-o">
                 /
                </span>
                <span class="crayon-v">
                 span
                </span>
                <span class="crayon-o">
                 &gt;
                </span>
                <span class="crayon-o">
                 +
                </span>
                <span class="crayon-v">
                 Arrays
                </span>
                <span class="crayon-sy">
                 .
                </span>
                <span class="crayon-e">
                 toString
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 result
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ;
                </span>
               </div>
               <div class="crayon-line" id="crayon-576866801c3b3267759240-29">
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 }
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-576866801c3b3267759240-30">
                <span class="crayon-sy">
                 }
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0708 seconds] -->
        <p>
        </p>
        <h3>
         小结
        </h3>
        <p>
         以上测试程序显示神经网络有很神奇的分类效果，实际上神经网络有一定优势，但也不是接近人脑的 万能算法，很多时候它可能会让我们失望，还需要结合各种场景的数据大量运用去观察其效果。我们可以把1层隐含层改成n层，并调整每层节点数、迭代次数、学 习步长和动量系数，以获得一个最优化的结果。但是很多时候n层隐含层的效果并不比1层有明显提升，反而计算更复杂耗时，我们对神经网络的认识还需要多实践 多体会。
        </p>
        <blockquote>
         <p>
          作者简介：彭渊，在Java技术领域从业十多年，曾撰写多款开源软件，历任淘宝高级专家和华为中间件首席架构师。开源代表作有Fourinone（四不像）分布式核心技术框架、CoolHash并行数据库引擎等，曾出版书籍《大规模分布式系统架构与设计实战》。
          <br/>
          责编：周建丁（zhoujd@csdn.net）
         </p>
        </blockquote>
       </div>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24663.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/095356be8cb4z9ke9389kd-204x200.jpeg"/>
        </a>
        <a class="link" href="http://dataunion.org/24663.html" rel="bookmark" title="人工智能界最强大脑畅谈AI未来之路">
         人工智能界最强大脑畅谈AI未来之路
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24652.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/02/20150522141422337-265x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24652.html" rel="bookmark" title="重磅 | MIT与谷歌专家合著论文：机器学习和神经科学的相互启发与融合（附论文）">
         重磅 | MIT与谷歌专家合著论文：机器学习和神经科学的相互启发与融合（附论文）
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24616.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/224806wllbe6tcimyyi9xt-300x167.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24616.html" rel="bookmark" title="微软人工智能计划背后的华人力量">
         微软人工智能计划背后的华人力量
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/24562.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/06/8aac7ceb921d1684f06e6f65e2c1f224-300x173.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/24562.html" rel="bookmark" title="各位大佬，别再拿人工智能当春药了！">
         各位大佬，别再拿人工智能当春药了！
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F21937.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/21937.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/21937.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>